package com.maple.mapper;

import com.maple.entity.OrderDetail;
import com.maple.entity.ShoppingCart;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderDetailMapper {

    /**
     * 根据购物车数据新增订单明细数据
     * @param cart
     */
    void add(List<ShoppingCart> cart);

    /**
     * 根据订单号查询
     * @param id
     * @return
     */
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> queryByOrderId(Long id);
}
